<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('积分变动')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-user-add" th:object="${whUser}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">增减积分：</label>
                <div class="col-sm-8">
                    <input id="integral" name="integral" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "whzj/user"
        $("#form-user-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            //添加积分变动信息
            $.ajax({
                type: "post",
                url: prefix + "/integral?id="+$("#id").val()+"&integral="+$("#integral").val(),
                success: function(r) {
                    $.modal.msgSuccess("修改成功");
                    $.modal.reload();
                }
            });

        }
    </script>
</body>
</html>